set the visible of card field 1 to not the visible of card field 1
if the visible of card field 1 is true then
set the name of me to "Hide Pascal Source"
else set the name of me to "Show Pascal Source"
end mouseUp
-- part contents for background part 16
----- text -----
CLIPTOPICT XFCN version 1.6
Kevin Calhoun
ClipToPICT creates a PICT resource from a picture you've copied to the clipboard and copies it to the current stack. You can tell ClipToPICT what ID number you want the PICT resource to have or you can let it select an unused number for you. If you choose a number that belongs to another PICT resource currently contained in your stack, the new picture will overwrite the old one.
You'll know when there's a picture on the clipboard by examining HyperCard's edit menu. If the paste item says "Paste Picture," then there's a picture available for ClipToPICT to turn into a PICT resource.
As with other resource copiers, if you use ClipToPICT to copy a PICT into the Home stack, you may have to quit and relaunch HyperCard in order to use it.
INVOKING CLIPTOPICT
get ClipToPICT(<pictID>,<"pictName">)
result: resourceID
Both parameters are optional. If you don't pass a value for pictID, ClipToPICT will find an ID for the PICT resource that's not currently in use. If you don't pass a value for pictName, the PICT resource will be unnamed. If you pass a value for pictID or pictName that's already in use by another PICT resource in the current stack, the old PICT will be overwritten.
If the clipboard contains no pictures, or if there was a problem accessing the scrap, opening the current stack's resource file, or writing the resource, ClipToPICT will return an error message. Word 1 of this message will be "Error."
EXAMPLES
put ClipToPICT(0,"The Little Engine That Could") into pictNumber
get ClipToPICT(2880,"")
REVISION HISTORY
1.0 -- 4/22/88
1.5 -- 3/15/89 Altered source code for compatibility with MPW Pascal 3.0. Also removed necessity of passing 0 as the PICT ID when you wanted ClipToPICT to select an unused ID.
1.6 -- 7/22/89 No longer leaves a NIL master pointer behind when replacing a resource.
-- part contents for card part 2
----- text -----
UNIT ClipToPICTUnit;
{ ClipToPICT XFCN © 1988-1989 by the Trustees of Dartmouth College }